/*
 * Copyright (c) 2014 laidian. All Rights Reserved.
 * @author yaoyuming
 * @date  2020-06-03 17:41
 */
package com.yao.common.filter;

import java.io.IOException;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;

import cn.hutool.core.lang.Console;

/**
 * @author yaoyuming
 * @date 2020/06/03 17:41
 */
@WebFilter(urlPatterns = "/**")
public class LocalDateTimeFilter implements Filter{

    /**
     * 年月日
     */
    private final static String YYYYMMDD= "yyyy-MM-dd";

    /**
     * 年月日时分
     */
    private final static String YYYYMMDDHHMM= "yyyy-MM-dd HH:mm";

    /**
     * 年月日时分秒
     */
    private final static String YYYYMMDDHHMMSS= "yyyy-MM-dd HH:mm:ss";


    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
        Console.log("0-p---------------------------");
        filterChain.doFilter(new RequestWrapper((HttpServletRequest) request), response);
    }
}